package zerdlib.namedObject;

import java.awt.Component;

import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;
import javax.swing.ListCellRenderer;


public class NamedObjectListRenderer implements ListCellRenderer<NamedObject> {
	private final ListCellRenderer<Object> renderer = new DefaultListCellRenderer();
	@Override
	public Component getListCellRendererComponent(
			JList<? extends NamedObject> list, NamedObject value, int index,
			boolean isSelected, boolean cellHasFocus) {
		return renderer.getListCellRendererComponent(list, value.getName(), index, isSelected, cellHasFocus);
	}

}
